<template>
<div class="app-container">
  <loading v-show="loading"></loading>
  <el-card class="box-card indexUser" style="margin-bottom:1%;"  v-if="addForm.userAccount">
    <el-form :model="addForm" :disabled="ifDisabled" ref="addForm" label-width="140px" class="detailStyle">
      <el-row>
          <el-col :span="8">
            <span class="labelSpan">
              用户账号:
            </span>
            <span class="valueSpan">
              {{addForm.userAccount}}
            </span>
          </el-col>
          <el-col :span="8">
            <span class="labelSpan">
              用户姓名:
            </span>
            <span class="valueSpan">
              {{addForm.userName}}
            </span>
          </el-col>
          <el-col :span="8">
            <span class="labelSpan">
              联系电话:
            </span>
            <span class="valueSpan">
              {{addForm.phone}}
            </span>
          </el-col>
      </el-row>
      <!-- <el-row>
          <el-col :span="8">
           <el-form-item label="所属机构:" class="tree-input">
             <el-input type="hidden" v-model="addForm.orgKey" auto-complete="off" style="height:0;display:inline;"></el-input>
             <el-popover
                placement="bottom"
                width="400"
                disabled
               >
                <el-tree
                  :data="orgData"
                  show-checkbox
                  :props="defaultProps"
                  check-strictly
                  ref="orgTree"
                  node-key="orgKey"
                  :default-checked-keys="[addForm.orgKey]"
                  @check="handleOrgClick"
                  >
                </el-tree>
                <el-input v-model="orgName"  slot="reference" readonly></el-input>
              </el-popover>
           </el-form-item>
         </el-col>
         <el-col :span="8">
           <el-form-item label="用户角色" prop="roleId">
            <el-select v-model="roleIds" multiple placeholder="请选择用户角色">
              <el-option
                v-for="item in roleList"
                :key="item.roleKey"
                :label="item.roleName"
                :value="item.roleKey">
              </el-option>
            </el-select>
           </el-form-item>
         </el-col>
         <el-col :span="8">
           <el-form-item label="行政职务" prop="partyOrgPost">
            <el-select v-model="partyOrgPost" multiple placeholder="请选择用户角色">
              <el-option
                v-for="item in partyOrgPostList"
                :key="item.paramValue"
                :label="item.paramName"
                :value="item.paramValue">
              </el-option>
            </el-select>
           </el-form-item>
         </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="是否是党员:">
            <el-select v-model="addForm.isPartyMember"  placeholder="请选择" style="width:100%;">
              <el-option
                v-for="item in ISNOT"
                :key="item.paramValue"
                :label="item.paramName"
                :value="item.paramValue">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row v-if="isPartyMember">
        <el-col :span="24">
          <el-row>
            <el-col :span="8">
              <el-form-item label="党组织机构:" class="tree-input">
                <el-input type="hidden" v-model="addForm.partyOrgInfoKey" auto-complete="off" style="height:0;display:inline;"></el-input>
                <el-popover
                  placement="bottom"
                  width="400"
                  disabled
               >
                  <el-tree
                    :data="partyOrgData"
                  show-checkbox
                  check-strictly
                  ref="partyOrgTree"
                  node-key="partyOrgKey"
                  :default-checked-keys="[addForm.partyOrgInfoKey]"
                  accordion
                  @check="handleClick"
                    >
                  </el-tree>
                  <el-input v-model="partyOrgName"  slot="reference" readonly></el-input>
                </el-popover>
              </el-form-item>
            </el-col>
            <el-col :span="8">
                <el-form-item label="党内职务" prop="sysOrgPost">
                  <el-select v-model="sysOrgPost" multiple placeholder="请选择用户角色">
                    <el-option
                      v-for="item in sysOrgPostList"
                      :key="item.paramValue"
                      :label="item.paramName"
                      :value="item.paramValue">
                    </el-option>
                  </el-select>
                </el-form-item>
            </el-col>
            <el-col :span="8">
              <span class="labelSpan">
                身份证号:
              </span>
              <span class="valueSpan">
                {{addForm.idNumber}}
              </span>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="8">
              <el-form-item label="性别:">
                <el-select v-model="addForm.sex"  placeholder="请选择性别" style="width:100%;">
                  <el-option
                    v-for="item in SEX"
                    :key="item.paramValue"
                    :label="item.paramName"
                    :value="item.paramValue">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="民族:">
                <el-select v-model="addForm.nation"  placeholder="请选择" style="width:100%;">
                  <el-option
                    v-for="item in NATION"
                    :key="item.paramValue"
                    :label="item.paramName"
                    :value="item.paramValue">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <span class="labelSpan">
                籍贯:
              </span>
              <span class="valueSpan">
                {{addForm.natives}}
              </span>
            </el-col>
            
          </el-row>
          <el-row>
            <el-col :span="8">
              <el-form-item label="台湾户籍:">
                <el-select v-model="addForm.isTwNative"  placeholder="请选择" style="width:100%;">
                  <el-option
                    v-for="item in ISNOT"
                    :key="item.paramValue"
                    :label="item.paramName"
                    :value="item.paramValue">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <span class="labelSpan">
                出生日期:
              </span>
              <span class="valueSpan">
                {{addForm.birthday}}
              </span>
            </el-col>
            <el-col :span="8">
              <el-form-item label="学历:">
                <el-select v-model="addForm.education"  placeholder="请选择" style="width:100%;">
                  <el-option
                    v-for="item in EDUCATION"
                    :key="item.paramValue"
                    :label="item.paramName"
                    :value="item.paramValue">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            
          </el-row>
          <el-row>
            <el-col :span="8">
              <el-form-item label="人员类别:">
                <el-select v-model="addForm.type"  placeholder="请选择" style="width:100%;">
                  <el-option
                    v-for="item in TYPE"
                    :key="item.paramValue"
                    :label="item.paramName"
                    :value="item.paramValue">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <span class="labelSpan">
                入党时间:
              </span>
              <span class="valueSpan">
                {{addForm.joinPartyDate}}
              </span>
            </el-col>
            <el-col :span="8">
              <span class="labelSpan">
                转正时间:
              </span>
              <span class="valueSpan">
                {{addForm.formalPartyDate}}
              </span>
            </el-col>
            
          </el-row>
          <el-row>
            <el-col :span="8">
              <el-form-item label="工作岗位类型:">
                <el-select v-model="addForm.post"  placeholder="请选择" style="width:100%;">
                  <el-option
                    v-for="item in POST"
                    :key="item.paramValue"
                    :label="item.paramName"
                    :value="item.paramValue">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <span class="labelSpan">
                参加工作时间:
              </span>
              <span class="valueSpan">
                {{addForm.joinWorkDate}}
              </span>
            </el-col>
            <el-col :span="8">
              <span class="labelSpan">
                家庭住址:
              </span>
              <span class="valueSpan">
                {{addForm.address}}
              </span>
            </el-col>
            
          </el-row>
          <el-row>
            <el-col :span="8">
              <span class="labelSpan">
                联系电话:
              </span>
              <span class="valueSpan">
                {{addForm.mobilePhone}}
              </span>
            </el-col>
            <el-col :span="8">
              <el-form-item label="婚姻状况:">
                <el-select v-model="addForm.maritalStatus"  placeholder="请选择" style="width:100%;">
                  <el-option
                    v-for="item in MARITALSTATUS"
                    :key="item.paramValue"
                    :label="item.paramName"
                    :value="item.paramValue">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <span class="labelSpan">
                档案管理单位:
              </span>
              <span class="valueSpan">
                {{addForm.archivesMngUnit}}
              </span>
            </el-col>
            
          </el-row>
          <el-row>
            <el-col :span="8">
              <el-form-item label="聘任专业技术职务:">
                <el-select v-model="addForm.technicalPosition"  placeholder="请选择" style="width:100%;">
                  <el-option
                    v-for="item in TECHNICALPOSITION"
                    :key="item.paramValue"
                    :label="item.paramName"
                    :value="item.paramValue">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <span class="labelSpan">
                一线情况:
              </span>
              <span class="valueSpan">
                {{addForm.frontlineSituation}}
              </span>
            </el-col>
            <el-col :span="8">
              <el-form-item label="新社会阶层类型:">
                <el-select v-model="addForm.newSocialType"  placeholder="请选择" style="width:100%;">
                  <el-option
                    v-for="item in NEWSOCIALTYPE"
                    :key="item.paramValue"
                    :label="item.paramName"
                    :value="item.paramValue">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            
          </el-row>
          <el-row>
            <el-col :span="8">
              <el-form-item label="是否农民工:">
                <el-select v-model="addForm.isMigrantWorker"  placeholder="请选择" style="width:100%;">
                  <el-option
                    v-for="item in ISNOT"
                    :key="item.paramValue"
                    :label="item.paramName"
                    :value="item.paramValue">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <span class="labelSpan">
                党员培训情况:
              </span>
              <span class="valueSpan">
                {{addForm.trainSituation}}
              </span>
            </el-col>
            <el-col :span="8">
              <span class="labelSpan">
                信息完整度（%）:
              </span>
              <span class="valueSpan">
                {{addForm.infoIntegrity}}
              </span>
            </el-col>
            
          </el-row>
          <el-row>
            <el-col :span="8">
              <el-form-item label="是否流动党员:">
                <el-select v-model="addForm.isFlowPartyMember"  placeholder="请选择" style="width:100%;">
                  <el-option
                    v-for="item in ISNOT"
                    :key="item.paramValue"
                    :label="item.paramName"
                    :value="item.paramValue">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8" v-if="isOutGoing">
              <span class="labelSpan">
                外出流向:
              </span>
              <span class="valueSpan">
                {{addForm.outgoingFlow}}
              </span>
            </el-col>
            <el-col :span="8">
              <el-form-item label="是否失联党员:">
                <el-select v-model="addForm.isLostPartyMember"  placeholder="请选择" style="width:100%;">
                  <el-option
                    v-for="item in ISNOT"
                    :key="item.paramValue"
                    :label="item.paramName"
                    :value="item.paramValue">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row  v-if="isLostMember">
            <el-col :span="8">
              <span class="labelSpan">
                失联具体情形:
              </span>
              <span class="valueSpan">
                {{addForm.lostSituation}}
              </span>
            </el-col>
            <el-col :span="8">
              <span class="labelSpan">
                失去联系时间:
              </span>
              <span class="valueSpan">
                {{addForm.lostTime}}
              </span>
            </el-col>
          </el-row>
        </el-col>
      </el-row> -->
    </el-form>
  </el-card>
  <el-row :gutter="20">
    <el-col :span="12" style="">
      <el-card class="box-card listCard" style="margin-bottom:1%;">
        <div slot="header" class="clearfix">
          <span>待办</span>
        </div>
        <ul v-if="todoData.length">
          <li v-for="(item,index) in todoData" :title="item.todoTitle" @click="handleTodo(item.description, item.todoRul)" :key="index+'list'">
            {{item.todoTitle}}
          </li>
        </ul>
      </el-card>
    </el-col>
    <el-col :span="12">
      <el-card class="box-card listCard" style="margin-bottom:1%;">
        <div slot="header" class="clearfix">
          <span>通知公告</span>
        </div>
        <ul v-if="noticeData.length">
          <li v-for="(item,index) in noticeData" :title="item.title" :key="index+'list'">
            <a :href="item.contentUrl" target="blank_">{{item.title}}</a>
            <em>{{new Date(item.addTime).toJSON()}}</em>
          </li>
        </ul>
      </el-card>
    </el-col>
  </el-row>
</div>
</template>
<script>
import Loading from '@/components/loading/loading'
import pagination from '@/components/pagination/index'
import { userDetail, todoList, noticeList } from '@/api/todo'
import { transform } from '@/utils/trans'
import store from '@/store'
export default {
  components: {
    Loading,
    pagination
  },
  data() {
    this.permissionHandle = this.$permissionHandle
    return {
      todoData: [],
      loading: false,
      deleteDep: {
        orgKey: ''
      },
      deleteDepArry: [],
      // 是否是党员
      isPartyMember: false,
      // 是否是失联党员
      isLostMember: false,
      // 是否流动党员
      isOutGoing: false,
      // 页面所有参数
      EDUCATION: [], // 学历
      MARITALSTATUS: [], // 婚姻状况
      NATION: [], // 民族
      NEWSOCIALTYPE: [], // 新社会阶层类型
      POST: [], // 工作岗位类型
      SEX: [], // 性别
      TECHNICALPOSITION: [], // 聘任专业技术职务类型
      TYPE: [], // 人员类别
      ISNOT: [], // 是否询问
      allDepartmentData: [],
      tableData: [],
      noticeData: [],
      // 禁用表单
      ifDisabled: false,
      // 新增角色数据
      addForm: {
        userAccount: '',
        userName: '',
        phone: '',
        orgKey: '',
        isPartyMember: '002',
        partyOrgInfoKey: '',
        idNumber: '',
        sex: '',
        nation: '',
        natives: '',
        isTwNative: '',
        birthday: '',
        education: '',
        type: '',
        joinPartyDate: '',
        formalPartyDate: '',
        post: '',
        joinWorkDate: '',
        address: '',
        mobilePhone: '',
        maritalStatus: '',
        archivesMngUnit: '',
        technicalPosition: '',
        newSocialType: '',
        frontlineSituation: '',
        trainSituation: '',
        isMigrantWorker: '',
        isLostPartyMember: '002',
        isFlowPartyMember: '002',
        outgoingFlow: '',
        infoIntegrity: '',
        lostSituation: '',
        lostTime: '',
        roleId: []
      },
      orgName: '',
      partyOrgName: '',
      dialogFormVisible: false, // 新增弹出框状态
      detailFormVisible: false,
      // 列表所选数据集合
      multipleSelection: [],
      // 组织机构
      orgData: [],
      roleList: [],
      // 党政机构
      partyOrgData: [],
      defaultProps: {
        value: 'orgKey',
        parentId: 'parOrg',
        children: 'children',
        label: 'orgName'
      },
      partyProps: {
        value: 'partyOrgKey',
        parentId: 'parPartyOrgInfoKey',
        children: 'children',
        label: 'partyOrgName'
      },
      roleIds: [],
      partyOrgPostList: [],
      partyOrgPost: [],
      sysOrgPost: [],
      sysOrgPostList: [],
      queryData: {},
      noticeSearch: {
        urls: ''
      }
    }
  },
  watch: {
    roleIds: function() {
      this.addForm.roleId = this.roleIds
    },
    partyOrgPost: function() {
      this.addForm.partyOrgPost = this.partyOrgPost
    },
    sysOrgPost: function() {
      this.addForm.sysOrgPost = this.sysOrgPost
    },
    addForm: {
      handler(val, oldVal) {
        if (val.isPartyMember === '001') {
          this.isPartyMember = true
        } else {
          this.isPartyMember = false
        }

        if (val.isLostPartyMember === '001') {
          this.isLostMember = true
        } else {
          this.isLostMember = false
        }
        if (val.isFlowPartyMember === '001') {
          this.isOutGoing = true
        } else {
          this.isOutGoing = false
        }
      },
      deep: true
    },
    dialogFormVisible: function() {
      if (this.dialogFormVisible === false) {
        this.partyOrgName = ''
        this.orgName = ''
        this.$refs['addForm'].resetFields()
        this.ifDisabled = false
      }
    }
  },
  created() {
    this.userDetails()
    this.getTodoList()
    this.getNotice()
  },
  updated() {
    this.getNodes()
  },
  methods: {
    handleTodo(description, todoRul) {
      var json = (new Function('return ' + description))()
      this.$router.push({
        path: todoRul,
        query: json
      })
    },
    getNotice() {
      this.noticeSearch.urls = process.env.NOTICE_URL + '/japi/getContentList.cmd?classId=10803&pageSize=10&order=addDate-down'
      noticeList(this.noticeSearch).then(response => {
        this.noticeData = response.data.allContent
        console.log(this.noticeData)
        this.loading = false
      }).catch(error => {
        this.loading = false
        console.log(error)
      })
      // axios({
      //   method: 'POST',
      //   url: process.env.NOTICE_URL + '/japi/getContentList.cmd?classId=10803&pageSize=9&order=addDate-down',
      //   headers: {
      //     'Content-Type': 'application/json'
      //   }
      // }).then(resp => {
      //   console.log(resp.data)
      //   this.noticeData = resp.data
      // }).catch(error => {
      //   console.log(error)
      // })
    },
    userDetails() {
      this.addForm = {
        userKey: store.getters.token
      }
      this.getDetail('edit')
      this.ifDisabled = false
    },
    getTodoList() {
      todoList().then(response => {
        this.todoData = response.data
        this.loading = false
      }).catch(error => {
        this.loading = false
        console.log(error)
      })
    },
    getNodes() {
      // // 默认选中组织机构
      if (this.dialogFormVisible || this.detailFormVisible) {
        if (this.$refs.orgTree && this.$refs.orgTree.getNode(this.addForm.orgKey) !== null) {
          this.orgName = this.$refs.orgTree.getNode(this.addForm.orgKey).data.orgName
        }
        if (this.$refs.partyOrgTree && this.$refs.partyOrgTree.getNode(this.addForm.partyOrgInfoKey) !== null) {
          this.partyOrgName = this.$refs.partyOrgTree.getNode(this.addForm.partyOrgInfoKey).data.partyOrgName
        }
      }
    },
    // 修改时选择父级机构
    handleClick(data, checked, node) {
      this.partyOrgName = data.partyOrgName
      this.addForm.partyOrgInfoKey = data.partyOrgKey
      if (checked) {
        this.$refs.partyOrgTree.setCheckedNodes([])
        this.$refs.partyOrgTree.setCheckedNodes([data])
        // 交叉点击节点
      } else {
        this.$refs.partyOrgTree.setCheckedNodes([])
        // 点击已经选中的节点，置空
      }
    },
    handleOrgClick(data, checked, node) {
      this.orgName = data.orgName
      this.addForm.orgKey = data.orgKey
      if (checked) {
        this.$refs.orgTree.setCheckedNodes([])
        this.$refs.orgTree.setCheckedNodes([data])
        // 交叉点击节点
      } else {
        this.$refs.orgTree.setCheckedNodes([])
        // 点击已经选中的节点，置空
      }
    },
    // 用户编辑及用户新增参数等信息
    getDetail(parmater) {
      return new Promise((resolve, reject) => {
        userDetail(this.addForm).then(response => {
          this.EDUCATION = response.data.EDUCATION
          this.MARITALSTATUS = response.data.MARITALSTATUS
          this.NATION = response.data.NATION
          this.NEWSOCIALTYPE = response.data.NEWSOCIALTYPE
          this.POST = response.data.POST
          this.SEX = response.data.SEX
          this.TECHNICALPOSITION = response.data.TECHNICALPOSITION
          this.TYPE = response.data.TYPE
          this.ISNOT = response.data.ISNOT
          this.roleList = response.data.roleList
          this.partyOrgPostList = response.data.partyOrgPost
          this.sysOrgPostList = response.data.sysOrgPost
          this.roleIds = []
          this.partyOrgPost = []
          this.sysOrgPost = []
          if (response.data.entity) {
            this.partyOrgPost = JSON.parse(response.data.entity.partyOrgPost)
            this.addForm.partyOrgPost = this.partyOrgPost
          }
          if (response.data.partyMemberInfo) {
            this.sysOrgPost = JSON.parse(response.data.partyMemberInfo.sysOrgPost)
            this.addForm.sysOrgPost = this.sysOrgPost
          }
          response.data.userRoles.forEach(element => {
            this.roleIds.push(element.roleId)
          })
          this.addForm.roleId = this.roleIds
          this.orgData = transform(response.data.orgList, 'orgKey', 'parOrg', 'children')
          this.partyOrgData = transform(response.data.partyOrgList, 'partyOrgKey', 'parPartyOrgInfoKey', 'children')
          if (parmater === 'edit' || parmater === 'detail') {
            if (response.data.entity && response.data.partyMemberInfo) {
              this.addForm = {
                userKey: response.data.entity.userKey,
                userAccount: response.data.entity.userAccount,
                userName: response.data.entity.userName,
                phone: response.data.entity.phone,
                orgKey: response.data.entity.orgKey,
                isPartyMember: response.data.entity.isPartyMember,
                partyOrgInfoKey: response.data.partyMemberInfo.partyOrgInfoKey,
                idNumber: response.data.partyMemberInfo.idNumber,
                sex: response.data.partyMemberInfo.sex,
                nation: response.data.partyMemberInfo.nation,
                natives: response.data.partyMemberInfo.natives,
                isTwNative: response.data.partyMemberInfo.isTwNative,
                birthday: response.data.partyMemberInfo.birthday,
                education: response.data.partyMemberInfo.education,
                type: response.data.partyMemberInfo.type,
                joinPartyDate: response.data.partyMemberInfo.joinPartyDate,
                formalPartyDate: response.data.partyMemberInfo.formalPartyDate,
                post: response.data.partyMemberInfo.post,
                joinWorkDate: response.data.partyMemberInfo.joinWorkDate,
                address: response.data.partyMemberInfo.address,
                mobilePhone: response.data.partyMemberInfo.mobilePhone,
                maritalStatus: response.data.partyMemberInfo.maritalStatus,
                archivesMngUnit: response.data.partyMemberInfo.archivesMngUnit,
                technicalPosition: response.data.partyMemberInfo.technicalPosition,
                newSocialType: response.data.partyMemberInfo.newSocialType,
                frontlineSituation: response.data.partyMemberInfo.frontlineSituation,
                trainSituation: response.data.partyMemberInfo.trainSituation,
                isMigrantWorker: response.data.partyMemberInfo.isMigrantWorker,
                isLostPartyMember: response.data.partyMemberInfo.isLostPartyMember,
                isFlowPartyMember: response.data.partyMemberInfo.isFlowPartyMember,
                outgoingFlow: response.data.partyMemberInfo.outgoingFlow ? response.data.partyMemberInfo.outgoingFlow : '',
                infoIntegrity: response.data.partyMemberInfo.infoIntegrity,
                lostSituation: response.data.partyMemberInfo.lostSituation ? response.data.partyMemberInfo.lostSituation : '',
                lostTime: response.data.partyMemberInfo.lostTime,
                partyMemberInfoKey: response.data.partyMemberInfo.partyMemberInfoKey
              }
            } else {
              if (response.data.entity) {
                this.addForm = {
                  userKey: response.data.entity.userKey,
                  userAccount: response.data.entity.userAccount,
                  userName: response.data.entity.userAccount,
                  phone: response.data.entity.phone,
                  orgKey: response.data.entity.orgKey,
                  isPartyMember: response.data.entity.isPartyMember
                }
              }
            }
            if (parmater === 'detail') {
              this.ifDisabled = true
              this.getNodes()
            }
            this.getNodes()
          } else {
            this.$refs['addForm'].resetFields()
            this.addForm = { isPartyMember: '002' }
          }
          this.loading = false
          resolve()
        }).catch(error => {
          this.loading = false
          reject(error)
        })
      })
    },
    submitForm(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.addData()
        } else {
          console.log('error submit!!')
          return false
        }
      })
    },
    resetForm(formName) {
      // this.dialogFormVisible = false
      this.$refs[formName].resetFields()
    },
    handleNodeClick(data) {
      this.parentOrgName = data.orgName
      this.addForm.parOrg = data.orgKey
    }
  }
}
</script>
<style lang="scss" scoped>
  .el-col-8{height:60px;}
  .tree-input{
    position: relative;
    margin-bottom:0;
    .el-form-item__content{line-height: auto;}
  }
  .input-tree{
      width: 100%;
      .el-scrollbar__wrap{overflow: auto;}
    }
    .tree-select,.el-date-editor{width: 100%;}

</style>
